package com.cpe.data.domain.student;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;

import com.sql.data.domain.user.UserForm;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
public class StudentForm extends UserForm {
	private static final long serialVersionUID = 5923454910961939250L;

	private Integer sex;

	private Integer age;

	private Date birthday;

	private String parentMobile;

	private String parentId;

	private Integer creatorRole;

	@Override
	public boolean stopCreate() {
		return StringUtils.isAnyBlank(this.getName()) || parentMobile == null || creatorRole == null
				|| birthday == null;
	}

	@Override
	public boolean stopUpdate() {
		return true;
	}
}
